/*
 * @Author: your name
 * @Date: 2020-08-19 11:39:56
 * @LastEditTime: 2020-08-26 16:40:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \前端案列\Webpack\src\index.js
 */
import './assets/css/index/index.css';
import Icon from './assets/images/2.png';

let image = new Image(); //暂时使用var, 因为uglifyjs(js压缩)不支持es6
image.src = Icon;
document.body.appendChild(image);

//开启babel-loader，以支持es6语法
class Person{
    constructor(){
        this.name = '张志明';
    }
    getName(){
        return this.name;
    }
}
const person = new Person();
console.log(person.getName());